home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
prog
/
cenvi29.arj
/
DOS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-03-08
|
1KB
|
54 lines
@echo OFF
::*******************************************
::*** DOS.CMD - OS/2 utility to run a DOS ***
::*** ver.1 command in a DOS session ***
::*******************************************
IF "%1"=="" GOTO INSTRUCTIONS
IF "%1"=="/?" GOTO INSTRUCTIONS
GOTO HAVE_PARMS
:INSTRUCTIONS
ECHO
ECHO DOS.CMD - EXECUTE DOS COMMAND FROM AN OS/2 SESSION
ECHO
ECHO SYNTAX: DOS [SEE] Command [parameters]
ECHO
ECHO Where:
ECHO SEE - Wait for command to finish, and "SEE" DOS output on this screen
ECHO Command - Any DOS session command
ECHO parameters - Parameters to pass to the DOS command
ECHO
ECHO Examples: DOS VER
ECHO DOS SEE PKZIP BOOK.ZIP *.DOC
ECHO
GOTO DOSCMD_FINI
:HAVE_PARMS
:Determine if the SEE option was provided
CEnvi return( stricmp('SEE','%1') ? 0 : 1 );
IF ERRORLEVEL 1 GOTO SEE_OUTPUT
CALL SESSION /DOS /FS /B /WAIT /TITLE "OS/2 Slave" COMMAND.COM "/C %1 %2 %3 %4 %5 %6 %7 %8 %9"
GOTO DOSCMD_FINI
:SEE_OUTPUT
SET DOSCMD_DEL_DIR=%DELDIR%
SET DELDIR=
IF EXIST %TEMP%\DOS_TODO.OUT del %TEMP%\DOS_TODO.OUT
SET DELDIR=%DOSCMD_DEL_DIR%
SET DOSCMD_DEL_DIR=
CALL SESSION /DOS /FS /B /WAIT /TITLE "OS/2 Slave" COMMAND.COM "/C %2 %3 %4 %5 %6 %7 %8 %9 > %TEMP%\DOS_TODO.OUT"
IF EXIST %TEMP%\DOS_TODO.OUT TYPE %TEMP%\DOS_TODO.OUT
SET DOSCMD_DEL_DIR=%DELDIR%
SET DELDIR=
IF EXIST %TEMP%\DOS_TODO.OUT del %TEMP%\DOS_TODO.OUT
SET DELDIR=%DOSCMD_DEL_DIR%
SET DOSCMD_DEL_DIR=
GOTO DOSCMD_FINI
:DOSCMD_FINI